package com.yc.bean;

public class Boss extends Leader {
    public Boss(String name) {
        super(name);
    }

    @Override
    public void handleRequest(int leaveDays) {
        if (leaveDays <= 10) {
            System.out.println("老板" + this.name + "审批了" + leaveDays + "天假");
            if(random.nextInt(2)==1){
                System.out.println("老板" + this.name + "批准了" + leaveDays + "天假");
            } else {
            System.out.println("老板" + this.name + "拒绝了" + leaveDays + "天假");
        }
    }else{
        if(this.superior!=null){
            this.superior.handleRequest(leaveDays);
        }
        }
    }
}
